//
//  GWLrcCell.m
//  QQ音乐
//
//  Created by qianfeng on 16/3/10.
//  Copyright © 2016年 高炜. All rights reserved.
//

#import "GWLrcCell.h"
#import "GWLrc.h"
#import "GWProgressLabel.h"
#import "Masonry.h"
@implementation GWLrcCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self =[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GWProgressLabel *progressLabel =[[GWProgressLabel alloc]init];
        progressLabel.translatesAutoresizingMaskIntoConstraints =NO;
        [self.contentView addSubview:progressLabel];
        progressLabel.textAlignment =NSTextAlignmentCenter;
        progressLabel.font =[UIFont systemFontOfSize:14];
        progressLabel.textColor =[UIColor whiteColor];
        [progressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(self.contentView);
        }];
        self.progressLabel =progressLabel;
    }
    return self;
}
+(GWLrcCell *)cellWithTableView:(UITableView *)tableView
{
    GWLrcCell *cell =[tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (cell ==nil) {
        cell =[[GWLrcCell alloc]init];
        
        cell.backgroundColor =[UIColor clearColor];
        cell.selectionStyle =UITableViewCellSelectionStyleNone;
    }
    return cell;
}
-(void)setLrc:(GWLrc *)lrc
{
    
    _lrc =lrc;
    self.progressLabel.text =lrc.lrcText;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
